<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">

    <!-- 
            Replace path to template, title, header and body
            with actual data.
    -->
    <ui:composition template="/templates/template.xhtml">
        <ui:define name="pageTitle">Cadstro de Automóveis</ui:define>
        <ui:define name="titleBody">Cadstro de Automóveis</ui:define>
        <ui:define name="body">
            <h:panelGroup styleClass="painel">
                <h:form id="formulario">
                    <table style="margin: auto; text-align: left;">
                        <tr>
                            <td>
                                <h:outputText value="Montadora:" />
                            </td>
                            <td>
                                <h:selectOneMenu id="idCliente" value="#{pedidoCtrl.idClienteEscolhido}" style="margin-left: 25px;" required="true">
                                    <f:selectItem itemValue="" itemLabel="Selecione..."/>
                                    <f:selectItems value="#{veiculoCtrl.carregarMontadoras()}"/>
                                </h:selectOneMenu>
                                <h:message for="idMontadora"/>
                            </td>
                            
                        </tr>
                        <tr>
                            <td>
                                <h:commandButton value="Alterar"  actionListener="#{veiculoCtrl.alterar()}"> </h:commandButton>
                            </td>
                            <td>
                                <h:commandButton value="Listar Veículos"  action="listar" style="margin-left: 25px;"> </h:commandButton>
                            </td>
                        </tr>
                    </table>
                </h:form>
            </h:panelGroup>
        </ui:define>
    </ui:composition>

</html>